package com.example.demos.mapper;

import com.example.demos.dto.MarketAddDTO;
import com.example.demos.dto.MarketAddGoodsDTO;
import com.example.demos.dto.MarketDTO;
import com.example.demos.entity.Market;
import com.example.demos.entity.Store;
import com.example.demos.entity.Supplier;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.cglib.core.Local;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface MarketMapper {

    public List<MarketDTO> select(String state);

    List<Supplier> selectSupplier(String type);

    int insertMarket(Market market);

    List<Store> queryStoreId(BigInteger goodsuuid);

    int insertMarketDetail(@Param("md") MarketAddGoodsDTO marketDetail,
                           @Param("storeId") BigInteger storeId,
                           @Param("marketUuid") BigInteger uuid);

    int updateNumOfStore(@Param("goodsUuid") BigInteger goodsuuid, @Param("num") BigInteger num);

}
